<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>安昇租车-南京及周边城市租车最低价！！</title>
    <link rel="dns-prefetch" href="http://www.ashlybus.com/m/test">
    <meta name="description" content="安昇租车-提供5~63座配驾租车服务,承接南京及周边城市旅游租车、会议接送、商务接待、婚庆租车、机场接送、团体租车、企业班车。Tel:18120116637（兼微信）">
    <meta name="keywords" content="南京租车,安昇,安昇租车,租车,租车网,租车公司,汽车租赁,租车价格,旅游租车,婚庆租车,商务租车,企业租车,包车,租车手续">
    <script src="../js/flexible.js"></script>
    <script src="../js/vue.js"></script>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/other.css">
</head>
<body>

<div id="cases">
    <div class="title">
        <a href="javascript:history.back(-1);" class="back"></a>
        <h2>成功案例</h2>
        <a href="../index.html" class="index">首页</a>
    </div>
    <div class="content">
        <ul>
            <li v-for="c in cases">
                <div class="fl">
                    <a :href="'cases_detail.html?detail_id='+c.pro_id">
                        <img :src="c['img'][0]">
                    </a>
                </div>
                <div class="fr">
                    <h3>{{c.pro_title}}</h3>
                    <p v-html="c.pro_content" class="desc" style="text-indent: 2em;text-align: left;"></p>
                </div>

            </li>
        </ul>
    </div>
</div>
<script src="../js/jquery-1.10.2.min.js"></script>
<script src="../js/common.js"></script>
<script>
    var cases=new Vue({
        el:"#cases",
        data:{
            cases:{},
//            casestxt:[]
        },
        methods:{
            getData:function(){
                var _self=this;
                $.ajax({
                    url:"../data/cases.php",
                    success:function(data){
                        var arr=data;

                        for(var i= 0,str='';i<data.length;i++){
                            str=arr[i].pro_content.split(">")[1].split("<")[0];
                            arr[i].pro_content=str.slice(0,30)+"....";
                        }
                        _self.cases=arr;
//                        _self.casestxt=data
//        设置fr_css,1280/960
//                        var w=.3*parseFloat($("body").css("width")),
//                                h=960/1280*w;
//                        $(".content li>div").css("height",h);
////                        $(".content .fr").css("height",h);
//                        var h3=parseFloat($(".content .fr h3").css("height"));
////                        h3+div
//                        var $desc=$(".content .desc");
////                        var h_fr=h3+parseFloat($desc.css("height"));
//                        console.log($(".content li>div"));
//                        console.log(h,h3);
//                        if(h_fr>h_fl){
//                            $desc.css("height",h_fr-h3)
//                                    .append("<i class='omit'>...</i>");
//                        }


                    },
                    error:function(XMLHttpRequest, textStatus, errorThrown){
                        console.log(XMLHttpRequest, textStatus, errorThrown);
                    }
                });
            }
        }

    });
    cases.getData();
//    window.onload=function(){
////        设置fr_css
//        var h_fl=parseFloat($(".content img").css("height"));
//
//        $(".content .fr").css("height",h_fl);
//        var h3=parseFloat($(".content .fr h3").css("height"));
////                        h3+div
//        var $desc=$(".content .desc");
//        var h_fr=h3+parseFloat($desc.css("height"));
//        console.log(h_fl,h3,h_fr);
//        if(h_fr>h_fl){
//            $desc.css("height",h_fr-h3)
//                    .append("<i class='omit'>...</i>");
//        }
//    };
</script>
</body>
</html>